package cn.wenhaha.wxBox.spellbook

import android.content.ContentValues
import com.gh0u1l5.wechatmagician.spellbook.base.Operation
import com.gh0u1l5.wechatmagician.spellbook.interfaces.IDatabaseHook
import de.robv.android.xposed.XposedBridge

object Message : IDatabaseHook {
    override fun onDatabaseInserted(  thisObject: Any,
                                        table: String,
                                        nullColumnHack: String?,
                                        initialValues: ContentValues?,
                                        conflictAlgorithm: Int,
                                        result: Long?): Operation<Long> {


        if (table == "message"){
           XposedBridge.log("New Message: $initialValues")
        }

        return super.onDatabaseInserted(
            thisObject,
            table,
            nullColumnHack,
            initialValues,
            conflictAlgorithm,
            result
        )
    }
}